package com.kxf.mvptest.model;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

import com.kxf.mvptest.contract.GetPicContract;

import java.io.IOException;

/**
 * @ProjectName: AndroidTestDemo
 * @Package: com.kxf.mvptest.model
 * @ClassName: GetPicModelImpl
 * @Description: java类作用描述
 * @Author: kuangxuefeng
 * @qq: 1024883177
 * @CreateDate: 2020/5/21 9:16
 */
public class GetPicModelImpl implements GetPicContract.Model {
    @Override
    public Bitmap getPic(Context context) {
        try {
            return BitmapFactory.decodeStream(context.getAssets().open("mylogo.png"));
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }
}
